﻿# -*- coding: utf-8 -*-
'''
Created on 21.05.2011

@author: Andrey Gaidel
'''


import contexts
from django import template
from django.template.defaultfilters import stringfilter
from django.utils.safestring import SafeUnicode

register = template.Library()

@register.filter(name='appname')
@stringfilter
def app_name(value):
    for key in contexts.app_verbose_names:
        value = value.replace(key, contexts.app_verbose_names[key])
    return SafeUnicode(value.strip())
